window.onload = function(){
	var container = document.getElementById('container');
	var sub_container =  container.getElementsByTagName('div');
	var move_distance = -2;
	container.innerHTML += container.innerHTML ;
	container.style.width =( sub_container[0].offsetWidth+20)*sub_container.length + 'px';
	function move(){
		if(container.offsetLeft<-(parseInt(container.style.width)/2)){
			container.style.left = '0';
		}
		
		container.style.left = container.offsetLeft + move_distance + 'px';
	}

	var timer = setInterval(move,30);
	container.onmousemove = function(){
		clearInterval(timer);
	}
	container.onmouseout = function(){
		timer = setInterval(move,30);
	}
}
